#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int a[N];
int b[N];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
        b[a[i]]++;
    }
    for(int i=1;i<N;i++)b[i]+=max(b[i-1]-b[i],0);
    cout<<b[N-1]<<endl;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
/*AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOI
AKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIOIAKIO*/